package com.yoyosys.jdbcdatdbase.controller;

import com.yoyosys.common.vo.Message;
import com.yoyosys.jdbcdatdbase.po.SqlExecutor;
import com.yoyosys.jdbcdatdbase.service.JdbcConnectDatabaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/jdbcTest")
public class JdbcConnectDatabaseController {
    @Autowired
    private JdbcConnectDatabaseService jdbcConnectDatabaseService;


    @PostMapping("/executeSql")
    public Message executeSql( @RequestBody SqlExecutor sqlExecutor){
        return jdbcConnectDatabaseService.executeSql(sqlExecutor);
    }
}
